﻿@model IQueryable<guanli.Models.Book>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Basic Form - jQuery EasyUI Demo</title>
    <link rel="stylesheet" type="text/css" href="~/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="~/themes/icon.css">
    <script type="text/javascript" src="~/Scripts/jquery-1.7.1.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.min.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.easyui.min.js"></script>
</head>
<body>
    <center>
	<h2>图书查询</h2>
	<p>请在下方填写要查询图书的详细信息</p>
	<div style="margin:20px 0;"></div>
	<div class="easyui-panel" title="" style="width:100%;max-width:400px;padding:30px 60px;">
		<form id="ff" method="post">
			<div style="margin-bottom:20px">
				<input class="easyui-textbox" name="name" style="width:100%;" data-options="label:'书号/书名'">
			</div>
		</form>
		<div style="text-align:center;padding:5px 0">
			<a id="chaxun" href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()" style="width:80px">查询</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()" style="width:80px">清除</a>
		</div>
	</div>
        <h4>查询结果如下</h4>
	<div style="margin:20px 0;"></div>
	<div id="d">
    @Html.Partial("xianshi", Model)
</div>
        
    <script type="text/javascript">
        $(document).ready(function () {
            $("#chaxun").click(function () {
                //alert(document.getElementById("mingzi").value);
                $.post("/ChaXun/getResponse", $("#ff").serialize(), function (dates) {
                    //alert(dates);
                    $("#d").html(dates);
                })
            })
        })
    </script>
	<script>
	    function submitForm() {
	        $('#ff').form('submit');
	    }
	    function clearForm() {
	        $('#ff').form('clear');
	    }
	</script>
    </center>
</body>
</html>
